package com.google.gwt.gfx.client.graphics.vml;

import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.gfx.client.graphics.Graphic;
import com.google.gwt.gfx.client.style.DefaultStyle;
import com.google.gwt.user.client.Element;

public class VMLDefaultStyle extends DefaultStyle {

	public VMLDefaultStyle(Graphic g) {
		super(g);
	}

	public VMLDefaultStyle(Graphic g, Element element) {
		super(g, element);
	}

	@Override
	public int getHeight() {
		return element().getOffsetHeight();
	}

	@Override
	public int getLeft() {
		return element().getOffsetLeft();
	}

	@Override
	public int getTop() {
		return element().getOffsetTop();
	}

	@Override
	public int getWidth() {
		return element().getOffsetWidth();
	}

	@Override
	public void setHeight(int height) {
		element().getStyle().setHeight(height, Unit.PX);
	}

	@Override
	public void setLeft(int left) {
		element().getStyle().setLeft(left, Unit.PX);
	}

	@Override
	public void setTop(int top) {
		element().getStyle().setTop(top, Unit.PX);
	}

	@Override
	public void setWidth(int width) {
		element().getStyle().setWidth(width, Unit.PX);
	}

}
